package miiteen.hb.notice.beans;

import miiteen.core.configuration.MeetingProperties;
import miiteen.customsportal.basic.beans.HistoryViewBase;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Notice extends HistoryViewBase {
    /**
     * id
     */
    private String id;
    /**
     * 通知标题
     */
    private String subject;
    /**
     * 办结时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date completeTime;
    /**
     * 序号
     */
    private String snNo;
    /**
     * 拟稿日期
     */
    private String draftTime;
    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 代字ID
     */
    private String snTitleName;
    /**
     * 代字年份
     */
    private String snYear;
    /**
     * 明细链接
     */
    private String url;
    /**
     * 序号
     */
    private String snStr;
    /**
     * 显示日期
     */
    private Date displayDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    public String getUrl() {
        return MeetingProperties.getConfigByKey("notice.url") + this.id;
    }

    public String getSnNo() {
        return snNo;
    }

    public void setSnNo(String snNo) {
        this.snNo = snNo;
    }

    public String getDraftTime() {
        return draftTime;
    }

    public void setDraftTime(String draftTime) {
        this.draftTime = draftTime;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getSnTitleName() {
        return snTitleName;
    }

    public void setSnTitleName(String snTitleName) {
        this.snTitleName = snTitleName;
    }

    public String getSnYear() {
        return snYear;
    }

    public void setSnYear(String snYear) {
        this.snYear = snYear;
    }

    public String getSnStr() {
        return this.snTitleName + "[" + this.snYear + "]" + this.snNo;
    }

    public Date getDisplayDate() {
        return this.completeTime;
    }
}
